-- treesitter 初始化
require'nvim-treesitter.configs'.setup {
    sync_install = false,
    ignore_install = {},
    highlight = {
        enable = true,
        -- 文件过大的将不处理
        disable = function(lang, buf)
            local max_filesize = 100 * 1024 -- 100 KB
            local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
            if ok and stats and stats.size > max_filesize then
                return true
            end
        end,
        additional_vim_regex_highlighting = false,
    },
    rainbow = {
        enable = true,
        disable = {"json", "xml"},
        extended_mode = true,
        max_file_lines = 10000
    }
}
